package bean;
/***********************************************************************
 * Module:  booktype.java
 * Author:  龙儿
 * Purpose: Defines the Class booktype
 ***********************************************************************/

import java.util.*;

/** @pdOid 1ce119c6-2966-4828-af6c-8f27bd3e475f */
public class booktype {
   /** @pdOid 190db70d-e7ff-4f1b-85c9-e3d004bf42ea */
   public long id;
   /** @pdOid a5986009-53bc-4105-b864-8ae286f5c460 */
   public java.lang.String typeName;
   /** @pdOid 71b9aab7-8ac1-41d1-8657-f936a521c5d0 */
   public int days = 3;
   /** @pdOid f5f7ac76-7ec4-4951-a9b5-f161686270db */
   public float fk;
   
   /** @pdRoleInfo migr=no name=bookinfo assc=reference1 coll=java.util.Collection impl=java.util.HashSet mult=0..* */
   public java.util.Collection<bookinfo> bookinfo;
   
   
   /** @pdGenerated default getter */
   public java.util.Collection<bookinfo> getBookinfo() {
      if (bookinfo == null)
         bookinfo = new java.util.HashSet<bookinfo>();
      return bookinfo;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorBookinfo() {
      if (bookinfo == null)
         bookinfo = new java.util.HashSet<bookinfo>();
      return bookinfo.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newBookinfo */
   public void setBookinfo(java.util.Collection<bookinfo> newBookinfo) {
      removeAllBookinfo();
      for (java.util.Iterator iter = newBookinfo.iterator(); iter.hasNext();)
         addBookinfo((bookinfo)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newBookinfo */
   public void addBookinfo(bookinfo newBookinfo) {
      if (newBookinfo == null)
         return;
      if (this.bookinfo == null)
         this.bookinfo = new java.util.HashSet<bookinfo>();
      if (!this.bookinfo.contains(newBookinfo))
      {
         this.bookinfo.add(newBookinfo);
         newBookinfo.setBooktype(this);      
      }
   }
   
   /** @pdGenerated default remove
     * @param oldBookinfo */
   public void removeBookinfo(bookinfo oldBookinfo) {
      if (oldBookinfo == null)
         return;
      if (this.bookinfo != null)
         if (this.bookinfo.contains(oldBookinfo))
         {
            this.bookinfo.remove(oldBookinfo);
            oldBookinfo.setBooktype((booktype)null);
         }
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllBookinfo() {
      if (bookinfo != null)
      {
         bookinfo oldBookinfo;
         for (java.util.Iterator iter = getIteratorBookinfo(); iter.hasNext();)
         {
            oldBookinfo = (bookinfo)iter.next();
            iter.remove();
            oldBookinfo.setBooktype((booktype)null);
         }
      }
   }

}